package spring.security.maven.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import spring.security.maven.aop.Procedure;
import spring.security.maven.serviceImp.UserServiceImp;

import javax.annotation.Resource;

@Controller
@RequestMapping("/user")
public class UserController extends BaseController {
    @Resource
    private UserServiceImp userServiceImp;
    @Procedure
    @RequestMapping("/get")
    public String getUser(){
        System.out.println("ById"+userServiceImp.selectByPrimaryKey(1));
      //  System.out.println("username"+userServiceImp.selectByUserName("757671834@qq.com").toString());
        return "index";
    }
    @RequestMapping("/admin")
    @Procedure(description = "登录了admin")
    public String admin(){

        return "admin/admin";
    }
    @Procedure
    @RequestMapping("/common")
    public String user(){

        return "user/user";
    }
@RequestMapping("/common/test")
    public String  ex(){

    return "user/test";

}


}
